package com.jumper.study.common.api;

public class CommonPageResult<T> extends CommonResult<T> {
    private Long page;
    
    private Long size;

    private Long total;

    public CommonPageResult() {

    }

    public CommonPageResult(Long page, Long size, Long total, T data) {
        super(ResultCode.SUCCESS.getCode(), ResultCode.SUCCESS.getMessage(), data);
        this.page = page;
        this.size = size;
        this.total = total;
    }



    public static <T> CommonPageResult<T> restPage(Long page, Long size, Long total, T data) {
        return new CommonPageResult<T>(page, size, total, data);
    }

    public Long getPage() {
        return page;
    }

    public void setPage(Long page) {
        this.page = page;
    }

    public Long getSize() {
        return size;
    }

    public void setSize(Long size) {
        this.size = size;
    }

    public Long getTotal() {
        return total;
    }

    public void setTotal(Long total) {
        this.total = total;
    }
}
